extends Card

func init():
    att.atk = 3
    att.maxHp = 2
    att.cry = 1
    lv = 1
    type = TYPE.CREATURE
    camp = "m_hearthstone"
    name = "烈焰小鬼"
    tab = "恶魔"
    dec = "战吼：对你的英雄造成3点伤害。"

func _connect():
    var skill:Skill = addSkill("k_zhanHou")
    skill.connect("onTrigger",self,"runTrigger")

func runTrigger():
    sys.scene.queueFunc(self,"eff",1.0,[getHero().getPos()])
    hurtCard(getHero(),3,false)

# 特效
func eff(pos):
    var eff = sys.scene.newEff("e_feiDang")
    eff.play("fei",false)
    eff.position = getPos()
    eff.lookAt(pos)
    eff.MoveTo(pos,500,false)
    yield(eff,"onMoveEnd")
    sys.scene.funcTime = 0.0
    eff.lookAt()
    eff.play("bao")